const wxml = (showData, ewmImgUrl, adminUrl) => {
	return `<view class="shareMain">
					<view class="logo">
						<image class="logo" src="${adminUrl}/crmebimage/public/images/share_logo.png"></image>
					</view>
					<view class="img">
						<image class="img" src="${showData.imgUrl}"></image>
					</view>
					<text class="title">${showData.name}</text>
					<view class="ewm">
						<view class="imgs">
							<image class="imgs" src="${ewmImgUrl}"></image>
						</view>
						<text class="name">长按识别二维码</text>
					</view>
				</view>`
}

const style = (screenWidth, canvasWidth, canvasHeight) => {
	return {
		"shareMain":{
			width: canvasWidth,
			height: canvasHeight,
			borderWidth: 10,
			borderColor: '#D1A791',
			backgroundColor: '#fff',
			padding: 12,
		},
		"logo":{
			width: 53,
			height: 44,
		},
		"img":{
			width: canvasWidth-44,
			height: 205,
			marginTop: 10,
			marginBottom: 10,
		},
		"title":{
			  width:canvasWidth-44,
			  height: 60,
			  fontSize: 16,
			  textAlign: 'center',
			  justifyContent:'center',
			  alignItems:'center',
			  marginTop:5,
			  marginBottom:5
		},
		"ewm":{
			  width: canvasWidth-44,
			  height: 180,
			  textAlign: 'center',
			  justifyContent:'center',
			  alignItems:'center'
		},
		"imgs":{
			  width: 160,
			  height: 160,
			  // marginTop: 10,
			  // marginBottom: 10,
			  // textAlign: 'center',
		},
		"name":{
			width:canvasWidth-44,
			height: 50,
			fontSize: 14,
			textAlign: 'center',
			justifyContent:'center',
			alignItems:'center',
			marginTop:5,
			marginBottom:5
		}
		
	}
}
module.exports = {
    wxml,
    style
}